
	function send(){
		var usertel=$("#usertel").val();
		console.log(usertel)
		var useryzm=$("#useryzm").val();	
		var str={
			mobile:usertel,
//			flag:2
			password:"123"
		}
		var httpUrl="http://172.16.35.242:8080/distribution/";
		$.ajax({
			method:"POST",
			url:httpUrl+"api/code/send",
			data:str,
			dataType:'json',
			success:function(msg){
		       console.log(msg);
			}
		});
	}

var sid;
$("#login-login").click(function(){
	var mobile = $("#logintel").val();
	var psd = $("#loginpsd").val();
	$.ajax({
	    type: 'POST',
	    url:'http://172.16.35.242:8080/distribution/api/user/login',
	    data: {
	   		mobile:mobile,
	    	password:psd
	    },
	    success:function(data){     
	      var str = data.msg;
	      sid = data.data;
	      localStorage.setItem("key", sid); 
	      if(str == "登录成功"){
	      	window.open("http://127.0.0.1:8020/第二个项目/index.html","_self")
	      } 
	    },
	    dataType:'json'
	});
})